package com.neusoft.mybatisdemo.bean;


import java.util.List;

/**
 * @author Administrator
 */
public class Admin {

    private Integer adminId;
    private String adminName;
    private String password;
    private String salt;

    /**
     * 一个用户对应多个角色
     */
    private List<Role> roles;

    public Admin() {
        super();
    }

    public Admin(Integer adminId, String adminName, String password) {
        super();
        this.adminId = adminId;
        this.adminName = adminName;
        this.password = password;
    }

    public Admin(Integer adminId, String adminName, String password, String salt) {
        this.adminId = adminId;
        this.adminName = adminName;
        this.password = password;
        this.salt = salt;
    }

    public Integer getAdminId() {
        return adminId;
    }

    public void setAdminId(Integer adminId) {
        this.adminId = adminId;
    }

    public String getAdminName() {
        return adminName;
    }

    public void setAdminName(String adminName) {
        this.adminName = adminName;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getSalt() {
        return salt;
    }

    public void setSalt(String salt) {
        this.salt = salt;
    }

    public List<Role> getRoles() {
        return roles;
    }

    public void setRoles(List<Role> roles) {
        this.roles = roles;
    }

    @Override
    public String toString() {
        return "Admin{" +
                "adminId=" + adminId +
                ", adminName='" + adminName + '\'' +
                ", password='" + password + '\'' +
                ", salt='" + salt + '\'' +
                ", roles=" + roles +
                '}';
    }
}
